package com.tourlaid.mamagerment.action.wx

import com.tourlaid.mamagerment.ao.wx.MyThoughtDetailAo
import com.tourlaid.mamagerment.entity.ResponseData
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import javax.annotation.Resource

/**
 * Created by xiaoyongge on 2017/7/23.
 * 我的说说详情
 */
@RestController
@RequestMapping("/tld/admin/mytdetail")
class MyThoughtDetailAction {

    @Resource
    var myThoughtDetailAo: MyThoughtDetailAo? = null

    /**
     * 获取全部的评论
     */
    @RequestMapping("/queryComments.json")
    fun queryComments(thoughtId: Long): ResponseData<MutableList<MutableMap<String, Any?>>> {
        val list = myThoughtDetailAo!!.queryComments(thoughtId)
        return ResponseData(list)
    }

    /**
     * 获取悬赏记录
     */
    @RequestMapping("/queryRewardRecords.json")
    fun queryRewardRecords(thoughtId: Long): ResponseData<MutableList<MutableMap<String, Any?>>> {
        val list = myThoughtDetailAo!!.queryRewardRecords(thoughtId)
        return ResponseData(list)
    }
}